﻿using CSharpSample;
using LaserTubeCuttingMachine.Utilities;

//TestReadXML();

TestRepetitiveWords();

Console.ReadLine();



void TestReadXML()
{
    string filename = "LDM-Cloud_TC42.XML";
    string eleName = "LTT";

    List<LTTModel> models = XmlHelper.ReadObjectsByName<LTTModel>(eleName, filename);
}

void TestRepetitiveWords()
{
    List<string> propNameList = new List<string>();

    Type t = typeof(LTTModel);
    var propertyInfos = t.GetProperties();

    foreach (var propertyInfo in propertyInfos)
    {
        propNameList.Add(propertyInfo.Name);
    }

    string templete = "<TextBlock Text=\"`placeholder`\" Padding=\"5 15 0 5\"/>\r\n                    <TextBox VerticalAlignment=\"Top\" Text=\"{Binding LTTModel.`placeholder`}\" Padding=\"5\" BorderBrush=\"LightGray\" BorderThickness=\"1\" />\r\n";
    string words = CollectionHelper.CreateRepetitiveWordsWithList(propNameList, templete);
}
